package com.xiaoyy.core.oplog.dao.model;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 业务接口日志历史表
 * </p>
 *
 * @author chenzh
 * @since 2020-06-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("OPLOG_API_HISTORY")
@ApiModel(value="OplogApiHistory对象", description="业务接口日志历史表")
public class OplogApiHistory extends Model<OplogApiHistory> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "REQ_LOG_ID", type = IdType.INPUT)
    private String reqLogId;

    @ApiModelProperty(value = "请求开始时间")
    @TableField("BEG_TIME")
    private Date begTime;

    @ApiModelProperty(value = "请求结束时间")
    @TableField("END_TIME")
    private Date endTime;

    @ApiModelProperty(value = "时长 单位秒")
    @TableField("COUNT_TIME")
    private BigDecimal countTime;

    @ApiModelProperty(value = "请求ip地址")
    @TableField("IP")
    private String ip;

    @ApiModelProperty(value = "请求方法标题")
    @TableField("TITLE")
    private String title;

    @ApiModelProperty(value = "请求类")
    @TableField("CLASS_PATH")
    private String classPath;

    @ApiModelProperty(value = "请求方法")
    @TableField("METHOD")
    private String method;

    @ApiModelProperty(value = "请求api")
    @TableField("REQ_API")
    private String reqApi;

    @ApiModelProperty(value = "请求体参数")
    @TableField("REQ_BODY")
    private String reqBody;

    @ApiModelProperty(value = "返回参数")
    @TableField("RES_BODY")
    private String resBody;

    @ApiModelProperty(value = "服务器ip")
    @TableField("SERVER_IP")
    private String serverIp;

    @ApiModelProperty(value = "服务器端口")
    @TableField("SERVER_PORT")
    private Integer serverPort;

    @ApiModelProperty(value = "应用名称")
    @TableField("SERVLET_CONTEXT")
    private String servletContext;

    @ApiModelProperty(value = "成功标识 0 成功 其他失败")
    @TableField("CODE")
    private String code;

    @ApiModelProperty(value = "描述")
    @TableField("MESSAGE")
    private String message;

    @ApiModelProperty(value = "年月")
    @TableField("YM")
    private Integer ym;

    @ApiModelProperty(value = "登入token")
    @TableField("ACCESS_TOKEN")
    private String accessToken;

    @ApiModelProperty(value = "路由id")
    @TableField("ROUTER_ID")
    private String routerId;

    @ApiModelProperty(value = "功能id")
    @TableField("FUNC_ID")
    private String funcId;

    @ApiModelProperty(value = "用户id")
    @TableField("USER_ID")
    private String userId;

    @ApiModelProperty(value = "姓名")
    @TableField("FULL_NAME")
    private String fullName;

    @ApiModelProperty(value = "第三方id")
    @TableField("OPEN_ID")
    private String openId;

    @ApiModelProperty(value = "登入方设备类型 pc app")
    @TableField("EQUIPMENT_TYPE")
    private String equipmentType;

    @ApiModelProperty(value = "应用id")
    @TableField("CLIENT_ID")
    private String clientId;

    @ApiModelProperty(value = "操作日志id")
    @TableField("OPLOG_ID")
    private Long oplogId;

    @ApiModelProperty(value = "登入类型：微信 单点登录")
    @TableField("LOGIN_TYPE")
    private String loginType;

    @ApiModelProperty(value = "用户类型")
    @TableField("USER_TYPE")
    private String userType;

    @ApiModelProperty(value = "系统版本号")
    @TableField("VERSION")
    private String version;

    @ApiModelProperty(value = "系统编号")
    @TableField("SYSTEM_CODE")
    private String systemCode;

    @ApiModelProperty(value = "系统名称")
    @TableField("SYSTEM_NAME")
    private String systemName;

    @ApiModelProperty(value = "登入方设备id")
    @TableField("EQUIPMENT_ID")
    private String equipmentId;

    @ApiModelProperty(value = "功能编号")
    @TableField("FUNC_CODE")
    private String funcCode;

    @ApiModelProperty(value = "功能类型")
    @TableField("FUNC_TYPE")
    private String funcType;

    @Override
    protected Serializable pkVal() {
        return this.reqLogId;
    }

}
